package com.tourismhengyang.beans;

public class WayInfo {
	private int wid;
	private String wtime;
	private	double wcost;
	private String wway;
	
	@Override
	public String toString() {
		return "WayInfo [wid=" + wid + ", wtime=" + wtime + ", wcost=" + wcost + ", wway=" + wway + "]";
	}

	public int getWid() {
		return wid;
	}

	public void setWid(int wid) {
		this.wid = wid;
	}

	public String getWtime() {
		return wtime;
	}

	public void setWtime(String wtime) {
		this.wtime = wtime;
	}

	public double getWcost() {
		return wcost;
	}

	public void setWcost(double wcost) {
		this.wcost = wcost;
	}

	public String getWway() {
		return wway;
	}

	public void setWway(String wway) {
		this.wway = wway;
	}

	public WayInfo(int wid, String wtime, double wcost, String wway) {
		super();
		this.wid = wid;
		this.wtime = wtime;
		this.wcost = wcost;
		this.wway = wway;
	}

	public WayInfo() {
		super();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(wcost);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + wid;
		result = prime * result + ((wtime == null) ? 0 : wtime.hashCode());
		result = prime * result + ((wway == null) ? 0 : wway.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		WayInfo other = (WayInfo) obj;
		if (Double.doubleToLongBits(wcost) != Double.doubleToLongBits(other.wcost))
			return false;
		if (wid != other.wid)
			return false;
		if (wtime == null) {
			if (other.wtime != null)
				return false;
		} else if (!wtime.equals(other.wtime))
			return false;
		if (wway == null) {
			if (other.wway != null)
				return false;
		} else if (!wway.equals(other.wway))
			return false;
		return true;
	}
}
